package com.cofey.app;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * Created by cofey on 16/6/3.
 */
@SpringCloudApplication
public class Application2 implements CommandLineRunner {
    public static void main(String[] args) {
        new SpringApplicationBuilder(Application2.class).web(true).run(args);
    }

    @Value("${test.env}")
    private String env;

    @Override
    public void run(String... args) throws Exception {
        System.out.println("env:" + env);
    }
}
